﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="attributesList.aspx.cs" Inherits="WebApp.admin.goods.attributesList" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1"><title>
	类型属性
</title><link href="../css/skin.css" rel="stylesheet" type="text/css" /></head>
<script type="text/javascript" src="../js/main.js"></script>
<script type="text/javascript" src="../js/jquery.min.js"></script>
<script type="text/javascript" src="../js/jquery.js"></script>

<body class="body">
    <table class="main" cellpadding="0" cellspacing="0">

        <tr>
 
            <td class="td_middle_middle">
                <div class="maincontent">
                    <form id="formSearch" action="attributesList.aspx">
                        <input id="btnAddAttributes" type="button" style='display:<%=AddDisplay %>; float:left;'  class="formButton" value="属性添加" onclick="location.href='attributes.aspx?ot=ad';" />
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <label>
                            查找：</label>
                        <select id="selectAttributes" name="t">
                            <option value="attributeName" selected="selected">属性名称</option>
                        </select>
                        <input id="txtKeyWord" type="text" name="kw" value="" />
                        <input id="btnSearch" type="submit" class="formButton" value="搜  索" />
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <label>
                            每页显示：</label>
                        <select id="selectPageSize" name="ps" onchange="SetPageSize();">
                            <option value="10">10</option>
                            <option value="20" selected="selected">20</option>
                            <option value="50">50</option>
                            <option value="100">100</option>
                        </select>
                        <input id="hdTid" type="hidden" value="0" name="tid" />
                    </form>
                    <form name="form1" runat="server" id="form1">
                          <table cellpadding="0" cellspacing="0">
                          <tr class="tr_title">
                                <td>
                                    <input name="chkall" value="1" type="checkbox" onclick="CheckAll(this,'Item')" title="全选/反选" />
                                </td>
                                <td>
                                    <span onclick="SetOrder('attributeName');">属性名称</span></td>
                                <td>
                                    <span onclick="SetOrder('goodsType');">商品类型</span></td>
                                <td>
                                    <span onclick="SetOrder('attributeInputType');">属性类型</span></td>
                                <td>
                                    <span onclick="SetOrder('isRequired');">是否必填</span></td>
                                <td>
                                    <span onclick="SetOrder('state');">是否启用</span></td>
                                <td>
                                    <span onclick="SetOrder('sortOrder');">排序</span></td>
                                <td>
                                    操作</td>
                            </tr>
                            <asp:Repeater ID="rptAttributes" runat="server"  OnItemDataBound="rptAttributes_ItemDataBound" >
                                <ItemTemplate>
                                    <tbody>
                                        <tr>
                                            <td>
                                                <input id='cb<%# Eval("id") %>' name="Item" type="checkbox" onclick="ShowDelete();"
                                                    value='<%# Eval("id") %>' /></td>
                                            <td>
                                                <%# Eval("attributeName")%>
                                            </td>
                                            <td>
                                                <%# Eval("goodsTypeName")%>
                                            </td>
                                              <td>
                                                <%# Eval("attributeInputType")%>
                                            </td>
                                            <td>
                                                <%# Convert.ToInt32(Eval("isRequired"))==0?"否":"是"%>
                                            </td>
                                             <td>
                                                <%# Convert.ToInt32(Eval("state"))==0?"否":"是"%>
                                            </td>
                                            <td>
                                                <%# Eval("sortOrder")%>
                                            </td>
                                            <td>
                                              <div style="float:left; display:block;" id="divEdit" runat="server">  <a href="attributes.aspx?ot=ed&id=<%# Eval("id") %>"  title="编辑">[编辑]</a></div>
                                              <div style="float:left; display:block;" id="divDeleted" runat="server">  <a title="删除" href="attributesList.aspx?action=del&amp;id=<%# Eval("id") %>" onclick="javascript:return confirm('确定要删除吗?');">[删除]</a></div>
                                           
                                            </td>
                                        </tr>
                                    </tbody>
                                </ItemTemplate>
                                <FooterTemplate>
                                    <tr>
                                        <td colspan="8" style="text-align: center;">
                                            <label id="lblEmpty" style='display: <%# rptAttributes.Items.Count==0?"block":"none"%>;
                                                color: Red;'>
                                                没有找到任何记录</label>
                                        </td>
                                    </tr>
                                </FooterTemplate>
                            </asp:Repeater>
                        </table>

                      <asp:Button ID="btnDelete" runat="server" Text="删除" OnClientClick="return confirm('确定要删除吗？');"
                            OnClick="btnDelete_Click" EnableViewState="false" CssClass="formButton" />
                        <% Response.Write((new Gift.WebApp.PageListNo()).DisplayPage(total, pageSize, pageIndex)); %>
                    </form>     
       </div>
            </td>
          
        </tr>

    </table>
</body>
</html>
